<html>
  <head>
    <title><%= @title %> </title>
    <%= stylesheet_link_tag "site" %>
    <%= javascript_include_tag :defaults %>
  </head>
  <body>
    <div id="whole_page">
      <div id="header">Oasis</div>
      <div id="nav">
        <span style="float: right">
          <% if logged_in? -%>
            <%= nav_link "个人首页", "user", "index" %>
            <%= nav_link "退出", "user", "logout" %>
          <% else -%>
            <%= nav_link "注册", "user", "register" %> |
            <%= nav_link "登陆", "user", "login" %>
          <% end %>
        </span>
        <%= nav_link "主页", "site", "index" %> |
        <%= nav_link "关于", "site", "about" %> |
        <%= nav_link "帮助", "site", "help" %>
      </div>
      <div id="content">
        <% if flash[:notice] -%>
          <div id="notice"><%= flash[:notice] %></div>
        <% end -%>
        <%= yield %>
      </div>
      <% if ENV["RAILS_ENV"] == "development" %>
        <div id="debug">
          <a href="#" onclick="Element.toggle('params_debug_info');return false">params</a> |
          <a href="#" onclick="Element.toggle('session_debug_info');return false">session</a>
          <fieldset id="params_debug_info" class="debug_info" style="display:none">
            <legend>params</legend>
            <%= debug(params) %>
          </fieldset>
          <fieldset id="session_debug_info" class="debug_info"style="display:none">
            <legend>session</legend>
            <%= debug(session) %>
          </fieldset>
        </div>
      <% end %>
    </div>
  </body>
</html>